package com.sjy.jnidemo2.cppcalljava;

import android.util.Log;

/**
 * 2-3测试
 * 2-5测试
 */
public class Person {
    public String str;
    public int age;


    //<2-3>测试
    public Person() {
        str = "222";
        age = -11;
        Log.d("SJY", "自定义类测试：c端调用java端,java端初始化自定义的类对象");
    }

    //=================================================================
    //<2-5>测试1 初始化
    public Person(int age) {
        this.age = age;
        Log.d("SJY", "c端初始化java端的代码Person(age)");
    }

    //<2-5> 1
    public void personAge() {
        Log.d("SJY", "c端调用java端代码：" + age);
    }
    //=================================================================

    //<2-5>测试2 初始化
    public Person(String name) {
        str = name;
        Log.d("SJY", "c端初始化java端的代码Person(str)");
    }

    //<2-5> 2
    public void personName() {
        Log.d("SJY", "c端调用java端代码：" + str);
    }
}
